package com.ymatou.iapi.trading.sellerquery.testcase;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymatou.query.seller.trading.api.parameter.GetSellerOrdersListSummary;
import com.ymatou.query.seller.trading.api.parameter.GetSellerOrdersListSummaryArguments;
import com.ymatou.query.seller.trading.api.parameter.GetSellerOrdersListSummaryResponse;
import com.ymatou.query.seller.trading.api.parameter.GetSellerOrdersListSummaryV2Bean;
import com.ymatou.query.seller.trading.api.parameter.Sp_GetSellerOrdersListSummaryV2;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.annotation.TestSuite;
import com.ymt.utils.tag.P1;
import com.ymt.utils.tag.P3;
import com.ymttest.common.enums.DateTypeEnum;
import com.ymttest.common.enums.OrderStatusEnum;
import com.ymttest.utils.DataUtil;
import com.ymttest.utils.DataUtil.KeyValuePair;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.constant.ECode;

/**
 * 获取商家订单列表V2 FreeMaker Template自动生成代码
 * 接口已经转接java
 */
@TestSuite
public class Ts_GetSellerOrdersListSummaryV2 {

	private static GetSellerOrdersListSummaryV2Bean getSellerOrdersListSummaryV2Bean;
//	private static com.ymatou.query.seller.trading.api.service.GetSellerOrdersListSummaryV2Call getSellerOrdersListSummaryV2Call;
	private static com.ymatou.iapi.trading.sellerquery.service.GetSellerOrdersListSummaryV2Call getSellerOrdersListSummaryV2Call;

	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("获取商家订单列表V2");
	}

	@Before
	public void caseUp() {
		getSellerOrdersListSummaryV2Bean = new GetSellerOrdersListSummaryV2Bean();
//		getSellerOrdersListSummaryV2Call = new com.ymatou.query.seller.trading.api.service.GetSellerOrdersListSummaryV2Call();
		getSellerOrdersListSummaryV2Call = new com.ymatou.iapi.trading.sellerquery.service.GetSellerOrdersListSummaryV2Call();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(getSellerOrdersListSummaryV2Call.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}

	private void verify() {
		GetSellerOrdersListSummaryResponse expectedResponse = new GetSellerOrdersListSummaryResponse();
		ConstructResponse(expectedResponse);
		GetSellerOrdersListSummaryResponse actualResponse = getSellerOrdersListSummaryV2Call
				.getSellerOrdersListSummaryResponse();
		DataUtil.verifyEquals(expectedResponse.getOrdersCount(),
				actualResponse.getOrdersCount(), "验证OrdersCount");
		DataUtil.verifyDecimalEquals(DataUtil.BigDecimall.GetValueOrDefault(expectedResponse.getExpectedTotalPrice()),
				actualResponse.getExpectedTotalPrice(), "验证ExpectedTotalPrice");
		DataUtil.verifyDecimalEquals(DataUtil.BigDecimall.GetValueOrDefault(expectedResponse.getExpectedSales()),
				actualResponse.getExpectedSales(), "验证ExpectedSales");
		DataUtil.verifyDecimalEquals(DataUtil.BigDecimall.GetValueOrDefault(expectedResponse.getExpectedTotalPriceYMTCoupon()),
				actualResponse.getExpectedTotalPriceYMTCoupon(), "验证ExpectedTotalPriceYMTCoupon");
	}

	@SuppressWarnings("rawtypes")
	private void ConstructResponse(GetSellerOrdersListSummaryResponse response) {
		GetSellerOrdersListSummaryArguments args = GetSellerOrdersListSummary
				.GetArguments(getSellerOrdersListSummaryV2Bean);
		Sp_GetSellerOrdersListSummaryV2 sp = new Sp_GetSellerOrdersListSummaryV2();
		if (args.getFilter() != null) {
			sp.setFilter(args.getFilter().getKey());
			sp.setFilterValue(args.getFilter().getValue());
		}
		sp.setSellerId(args.getSellerId());
		sp.setOrderSellerAcceptedStatus(args.getOrderSellerAcceptedStatus());
		sp.setOrderStatus(args.getOrderStatus());
		sp.setPaidInFull(args.getPaidInFull());
		sp.setTimeFrom(args.getTimeFrom());
		sp.setTimeTo(args.getTimeTo());
		
		List<Map> results = sp.execute();
		if (false == DataUtil.isNullOrEmpty(results)) {
			Map m = results.get(0);
			response.setOrdersCount((int) m.get("OrdersCount"));
			response.setExpectedTotalPrice((BigDecimal) m.get("ExpectedTotalPrice"));
			response.setExpectedSales((BigDecimal) m.get("ExpectedSales"));
			response.setExpectedTotalPriceYMTCoupon((BigDecimal) m.get("ExpectedTotalPriceYMTCoupon"));
		}
	}

	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_001() {
		Logger.start(true, "获取订单状态为1的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.All.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderEstablish.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_002() {
		Logger.start(true, "卖家用户id为空");
		try {
			// 参数
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.All.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.SellerAccept.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.ERROR400,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}

	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_003() {
		Logger.start(true, "获取订单状态为101的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.All.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderPostPay.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_004() {
		Logger.start(true, "获取订单状态为2的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.All.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.AccountPaid.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_005() {
		Logger.start(true, "获取订单状态为3的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.All.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.Shipped.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_006() {
		Logger.start(true, "获取订单状态为4的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.All.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.Received.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_007() {
		Logger.start(true, "获取订单状态为12的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.All.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.UserAcceptCancel.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_008() {
		Logger.start(true, "获取订单状态为13的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.All.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.SellerAcceptCancel.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_009() {
		Logger.start(true, "获取订单状态为18的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.All.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.SystemCancel.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P3.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_010() {
		Logger.start(true, "获取订单状态为16的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.All.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.ApplyForPostPay.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerOrdersListSumymaryV2_011() {
		Logger.start(true, "获取订单状态为1,2,3,4,16,17,101的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.All.getValue());
//			DateList.add(DateTypeEnum.ThisYear.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderEstablish.getValue());
			OrderStatusList.add(OrderStatusEnum.AccountPaid.getValue());
			OrderStatusList.add(OrderStatusEnum.Shipped.getValue());
			OrderStatusList.add(OrderStatusEnum.Received.getValue());
			OrderStatusList.add(OrderStatusEnum.ApplyForPostPay.getValue());
			OrderStatusList.add(OrderStatusEnum.SellerAccept.getValue());
			OrderStatusList.add(OrderStatusEnum.OrderPostPay.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_012() {
		Logger.start(true, "获取昨天的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.Yesterday.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderEstablish.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_013() {
		Logger.start(true, "获取今天的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.Today.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderEstablish.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_014() {
		Logger.start(true, "获取本周的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.ThisWeek.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderEstablish.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_015() {
		Logger.start(true, "获取本月的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.ThisMonth.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderEstablish.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_016() {
		Logger.start(true, "获取本季度的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.ThisQuarter.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderEstablish.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_017() {
		Logger.start(true, "获取今年的商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.ThisYear.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderEstablish.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_018() {
		Logger.start(true, "根据订单号获取商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.ThisYear.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderEstablish.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			KeyValuePair<Integer, String> filter = new KeyValuePair<Integer, String>(1, "30");
			getSellerOrdersListSummaryV2Bean.setFilter(filter);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_019() {
		Logger.start(true, "根据买家昵称获取商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.ThisYear.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderEstablish.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			KeyValuePair<Integer, String> filter = new KeyValuePair<Integer, String>(2, "测试");
			getSellerOrdersListSummaryV2Bean.setFilter(filter);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_020() {
		Logger.start(true, "根据收件人获取商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.ThisYear.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderEstablish.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			KeyValuePair<Integer, String> filter = new KeyValuePair<Integer, String>(3, "测试");
			getSellerOrdersListSummaryV2Bean.setFilter(filter);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
	
	@Test
	@Category(P1.class)
	@TestCase
	public void Tc_GetSellerOrdersListSummaryV2_021() {
		Logger.start(true, "根据Summary获取商家订单列表V2成功");
		try {
			// 参数
			int SellerId = Integer.valueOf(EnvSetup.getData("SellerId"));
			List<Integer> DateList = new ArrayList<Integer>();
			DateList.add(DateTypeEnum.ThisYear.getValue());
			getSellerOrdersListSummaryV2Bean.setDateList(DateList);
			ArrayList<Integer> OrderStatusList = new ArrayList<Integer>();
			OrderStatusList.add(OrderStatusEnum.OrderEstablish.getValue());
			getSellerOrdersListSummaryV2Bean
					.setOrderStatusList(OrderStatusList);
			getSellerOrdersListSummaryV2Bean.setSellerUserId(SellerId);
			KeyValuePair<Integer, String> filter = new KeyValuePair<Integer, String>(4, "测试");
			getSellerOrdersListSummaryV2Bean.setFilter(filter);
			// 发送请求
			getSellerOrdersListSummaryV2Call
					.setData(getSellerOrdersListSummaryV2Bean);
			getSellerOrdersListSummaryV2Call.callService();
//			Logger.comment("getSellerOrdersListSummaryV2Call send:"
//					+ getSellerOrdersListSummaryV2Call.getEntityString());
//			Logger.comment("getSellerOrdersListSummaryV2Call response:"
//					+ getSellerOrdersListSummaryV2Call.getReturnData());
			Logger.verifyEquals(ECode.SUCCESS,
					getSellerOrdersListSummaryV2Call.getCode(), "验证Code");
			verify();
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}